package com.jd.tank.abstractfactory;

import com.jd.tank.ResourceMgr;

import java.awt.*;

/**
 * @program: MyTank
 * @description:
 * @author: 王术平
 * @create: 2021-01-13 18:16
 **/
public abstract class BaseBullet {
    public int x;
    public int y;
//    public int height;
//    public int width;
    public static int WIDTH = ResourceMgr.bulletD.getWidth();
    public static int HEIGHT = ResourceMgr.bulletD.getHeight();

    //    public BaseBullet(int x, int y, int width, int height) {
//        this.x = x;
//        this.y = y;
//        this.height = height;
//        this.width = width;
//    }
    public BaseBullet(int x, int y) {
        this.x = x;
        this.y = y;
    }


    //画板渲染数据
    public abstract void paint(Graphics g);
    public abstract void collideWith(BaseTank tank);

    public void setX(int x) {
        this.x = x;
    }

    public void setY(int y) {
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public int getY() {
        return y;
    }


}
